functor CLrValsFun (structure Token: TOKEN
structure Ast: AST) = 
struct
structure ParserData=
struct
structure Header = 
struct
structure A = Ast

local open A
in structure Id = A.Id
   structure Intl = A.Intl
   
   structure B = A.Binop
   structure T = A.Tipe
   structure L = A.Lval
   structure E = A.Exp
   structure D = A.Dec
   structure S = A.Stm
   structure F = A.Fun
   structure Top = A.Top
   structure P = A.Program
end

fun binop (l, b, r, p) =
    E.Binop (l, b, r, p)


end
structure LrTable = Token.LrTable
structure Token = Token
local open LrTable in 
val table=let val actionRows =
"\
\\001\000\001\000\110\000\008\000\109\000\019\000\108\000\021\000\118\000\
\\028\000\106\000\029\000\105\000\030\000\104\000\031\000\103\000\
\\032\000\102\000\033\000\101\000\034\000\100\000\035\000\099\000\
\\036\000\098\000\037\000\097\000\000\000\
\\001\000\001\000\110\000\008\000\109\000\019\000\108\000\023\000\120\000\
\\028\000\106\000\029\000\105\000\030\000\104\000\031\000\103\000\
\\032\000\102\000\033\000\101\000\034\000\100\000\035\000\099\000\
\\036\000\098\000\037\000\097\000\000\000\
\\001\000\001\000\110\000\008\000\109\000\019\000\108\000\023\000\134\000\
\\028\000\106\000\029\000\105\000\030\000\104\000\031\000\103\000\
\\032\000\102\000\033\000\101\000\034\000\100\000\035\000\099\000\
\\036\000\098\000\037\000\097\000\000\000\
\\001\000\001\000\110\000\008\000\109\000\019\000\108\000\023\000\138\000\
\\028\000\106\000\029\000\105\000\030\000\104\000\031\000\103\000\
\\032\000\102\000\033\000\101\000\034\000\100\000\035\000\099\000\
\\036\000\098\000\037\000\097\000\000\000\
\\001\000\001\000\110\000\008\000\109\000\019\000\108\000\024\000\107\000\
\\028\000\106\000\029\000\105\000\030\000\104\000\031\000\103\000\
\\032\000\102\000\033\000\101\000\034\000\100\000\035\000\099\000\
\\036\000\098\000\037\000\097\000\000\000\
\\001\000\001\000\110\000\008\000\109\000\019\000\108\000\024\000\119\000\
\\028\000\106\000\029\000\105\000\030\000\104\000\031\000\103\000\
\\032\000\102\000\033\000\101\000\034\000\100\000\035\000\099\000\
\\036\000\098\000\037\000\097\000\000\000\
\\001\000\002\000\079\000\004\000\078\000\017\000\077\000\039\000\076\000\000\000\
\\001\000\002\000\079\000\017\000\077\000\023\000\115\000\039\000\076\000\000\000\
\\001\000\005\000\015\000\010\000\032\000\014\000\013\000\020\000\045\000\
\\025\000\031\000\026\000\011\000\000\000\
\\001\000\005\000\015\000\010\000\032\000\014\000\013\000\025\000\031\000\
\\026\000\011\000\000\000\
\\001\000\011\000\000\000\000\000\
\\001\000\012\000\018\000\018\000\017\000\029\000\016\000\000\000\
\\001\000\012\000\019\000\000\000\
\\001\000\012\000\020\000\000\000\
\\001\000\012\000\027\000\000\000\
\\001\000\012\000\038\000\029\000\016\000\000\000\
\\001\000\012\000\041\000\000\000\
\\001\000\012\000\042\000\000\000\
\\001\000\012\000\053\000\018\000\017\000\029\000\016\000\000\000\
\\001\000\012\000\055\000\000\000\
\\001\000\012\000\058\000\029\000\016\000\000\000\
\\001\000\012\000\064\000\018\000\017\000\029\000\016\000\000\000\
\\001\000\012\000\074\000\013\000\073\000\016\000\052\000\018\000\072\000\
\\020\000\071\000\022\000\070\000\027\000\069\000\029\000\068\000\000\000\
\\001\000\012\000\074\000\013\000\073\000\016\000\052\000\018\000\072\000\
\\022\000\070\000\027\000\069\000\029\000\068\000\000\000\
\\001\000\012\000\074\000\018\000\072\000\029\000\068\000\000\000\
\\001\000\012\000\088\000\015\000\087\000\018\000\086\000\024\000\085\000\
\\029\000\068\000\038\000\084\000\000\000\
\\001\000\012\000\088\000\015\000\087\000\018\000\086\000\029\000\068\000\
\\038\000\084\000\000\000\
\\001\000\012\000\092\000\000\000\
\\001\000\012\000\095\000\000\000\
\\001\000\016\000\025\000\029\000\024\000\000\000\
\\001\000\016\000\052\000\024\000\051\000\000\000\
\\001\000\017\000\048\000\000\000\
\\001\000\018\000\023\000\024\000\022\000\000\000\
\\001\000\018\000\075\000\024\000\022\000\000\000\
\\001\000\018\000\081\000\000\000\
\\001\000\018\000\090\000\000\000\
\\001\000\020\000\047\000\000\000\
\\001\000\021\000\057\000\000\000\
\\001\000\023\000\037\000\000\000\
\\001\000\023\000\040\000\000\000\
\\001\000\023\000\117\000\000\000\
\\001\000\023\000\141\000\000\000\
\\001\000\024\000\022\000\000\000\
\\001\000\024\000\051\000\000\000\
\\001\000\024\000\054\000\000\000\
\\001\000\024\000\056\000\000\000\
\\001\000\024\000\060\000\000\000\
\\001\000\029\000\021\000\000\000\
\\001\000\029\000\024\000\000\000\
\\147\000\005\000\015\000\010\000\014\000\014\000\013\000\025\000\012\000\
\\026\000\011\000\000\000\
\\148\000\000\000\
\\149\000\000\000\
\\150\000\000\000\
\\151\000\000\000\
\\152\000\007\000\039\000\000\000\
\\153\000\005\000\015\000\010\000\032\000\014\000\013\000\025\000\031\000\
\\026\000\011\000\000\000\
\\154\000\000\000\
\\155\000\000\000\
\\156\000\000\000\
\\157\000\000\000\
\\158\000\000\000\
\\159\000\000\000\
\\160\000\000\000\
\\161\000\000\000\
\\162\000\000\000\
\\163\000\000\000\
\\164\000\000\000\
\\165\000\000\000\
\\166\000\000\000\
\\167\000\000\000\
\\168\000\000\000\
\\169\000\007\000\046\000\000\000\
\\170\000\012\000\036\000\000\000\
\\171\000\000\000\
\\172\000\000\000\
\\173\000\000\000\
\\174\000\000\000\
\\175\000\000\000\
\\176\000\000\000\
\\177\000\000\000\
\\177\000\016\000\026\000\000\000\
\\178\000\000\000\
\\179\000\000\000\
\\180\000\005\000\015\000\010\000\014\000\014\000\013\000\025\000\012\000\
\\026\000\011\000\000\000\
\\181\000\000\000\
\\182\000\000\000\
\\183\000\000\000\
\\184\000\000\000\
\\185\000\000\000\
\\186\000\009\000\144\000\000\000\
\\187\000\000\000\
\\188\000\000\000\
\\189\000\000\000\
\\190\000\000\000\
\\190\000\018\000\114\000\000\000\
\\191\000\002\000\079\000\017\000\077\000\039\000\076\000\000\000\
\\192\000\000\000\
\\193\000\000\000\
\\194\000\000\000\
\\195\000\000\000\
\\196\000\000\000\
\\197\000\002\000\079\000\017\000\077\000\023\000\115\000\039\000\076\000\000\000\
\\197\000\002\000\079\000\017\000\077\000\039\000\076\000\000\000\
\\198\000\008\000\109\000\029\000\105\000\030\000\104\000\000\000\
\\199\000\008\000\109\000\029\000\105\000\030\000\104\000\000\000\
\\200\000\000\000\
\\201\000\000\000\
\\202\000\000\000\
\\203\000\008\000\109\000\019\000\108\000\028\000\106\000\029\000\105\000\
\\030\000\104\000\000\000\
\\204\000\008\000\109\000\019\000\108\000\028\000\106\000\029\000\105\000\
\\030\000\104\000\000\000\
\\205\000\008\000\109\000\019\000\108\000\028\000\106\000\029\000\105\000\
\\030\000\104\000\000\000\
\\206\000\008\000\109\000\019\000\108\000\028\000\106\000\029\000\105\000\
\\030\000\104\000\000\000\
\\207\000\008\000\109\000\019\000\108\000\028\000\106\000\029\000\105\000\
\\030\000\104\000\031\000\103\000\032\000\102\000\033\000\101\000\
\\034\000\100\000\000\000\
\\208\000\008\000\109\000\019\000\108\000\028\000\106\000\029\000\105\000\
\\030\000\104\000\031\000\103\000\032\000\102\000\033\000\101\000\
\\034\000\100\000\000\000\
\\209\000\000\000\
\\210\000\008\000\109\000\019\000\108\000\028\000\106\000\029\000\105\000\
\\030\000\104\000\031\000\103\000\032\000\102\000\033\000\101\000\
\\034\000\100\000\035\000\099\000\036\000\098\000\000\000\
\\211\000\001\000\110\000\008\000\109\000\019\000\108\000\028\000\106\000\
\\029\000\105\000\030\000\104\000\031\000\103\000\032\000\102\000\
\\033\000\101\000\034\000\100\000\035\000\099\000\036\000\098\000\000\000\
\\212\000\000\000\
\\213\000\007\000\140\000\000\000\
\\214\000\012\000\088\000\015\000\087\000\018\000\086\000\029\000\068\000\
\\038\000\084\000\000\000\
\\215\000\001\000\110\000\008\000\109\000\019\000\108\000\028\000\106\000\
\\029\000\105\000\030\000\104\000\031\000\103\000\032\000\102\000\
\\033\000\101\000\034\000\100\000\035\000\099\000\036\000\098\000\
\\037\000\097\000\000\000\
\\216\000\001\000\110\000\008\000\109\000\019\000\108\000\028\000\106\000\
\\029\000\105\000\030\000\104\000\031\000\103\000\032\000\102\000\
\\033\000\101\000\034\000\100\000\035\000\099\000\036\000\098\000\
\\037\000\097\000\000\000\
\"
val actionRowNumbers =
"\052\000\049\000\062\000\011\000\
\\060\000\050\000\063\000\061\000\
\\051\000\077\000\012\000\076\000\
\\013\000\075\000\081\000\047\000\
\\032\000\029\000\080\000\014\000\
\\068\000\055\000\078\000\067\000\
\\072\000\038\000\015\000\054\000\
\\039\000\016\000\017\000\008\000\
\\071\000\036\000\074\000\031\000\
\\057\000\009\000\030\000\048\000\
\\079\000\066\000\018\000\044\000\
\\019\000\045\000\037\000\020\000\
\\053\000\070\000\059\000\042\000\
\\064\000\073\000\065\000\046\000\
\\056\000\083\000\069\000\021\000\
\\022\000\058\000\033\000\082\000\
\\006\000\085\000\024\000\034\000\
\\025\000\091\000\024\000\035\000\
\\093\000\055\000\027\000\026\000\
\\026\000\028\000\095\000\026\000\
\\102\000\004\000\026\000\087\000\
\\026\000\099\000\094\000\007\000\
\\026\000\040\000\097\000\000\000\
\\005\000\098\000\001\000\026\000\
\\026\000\026\000\026\000\026\000\
\\026\000\026\000\026\000\026\000\
\\026\000\086\000\026\000\026\000\
\\026\000\114\000\101\000\002\000\
\\119\000\092\000\003\000\043\000\
\\096\000\084\000\023\000\116\000\
\\113\000\112\000\111\000\110\000\
\\109\000\108\000\107\000\105\000\
\\104\000\103\000\106\000\115\000\
\\100\000\118\000\041\000\121\000\
\\023\000\090\000\026\000\117\000\
\\089\000\120\000\023\000\088\000\
\\010\000"
val gotoT =
"\
\\015\000\144\000\019\000\001\000\000\000\
\\002\000\008\000\004\000\007\000\008\000\006\000\009\000\005\000\
\\018\000\004\000\020\000\003\000\021\000\002\000\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\013\000\028\000\014\000\027\000\020\000\026\000\000\000\
\\000\000\
\\022\000\031\000\000\000\
\\010\000\033\000\011\000\032\000\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\020\000\042\000\021\000\041\000\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\020\000\047\000\000\000\
\\001\000\048\000\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\003\000\057\000\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\002\000\061\000\004\000\007\000\008\000\006\000\017\000\060\000\
\\018\000\004\000\020\000\059\000\021\000\002\000\000\000\
\\000\000\
\\000\000\
\\001\000\065\000\012\000\064\000\016\000\063\000\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\012\000\078\000\000\000\
\\000\000\
\\005\000\081\000\012\000\080\000\000\000\
\\000\000\
\\012\000\087\000\000\000\
\\000\000\
\\000\000\
\\013\000\089\000\014\000\027\000\020\000\026\000\000\000\
\\000\000\
\\005\000\091\000\012\000\080\000\000\000\
\\005\000\092\000\012\000\080\000\000\000\
\\000\000\
\\000\000\
\\005\000\094\000\012\000\080\000\000\000\
\\000\000\
\\000\000\
\\005\000\109\000\012\000\080\000\000\000\
\\000\000\
\\005\000\111\000\012\000\110\000\000\000\
\\000\000\
\\000\000\
\\000\000\
\\005\000\114\000\012\000\080\000\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\005\000\119\000\012\000\080\000\000\000\
\\005\000\120\000\012\000\080\000\000\000\
\\005\000\121\000\012\000\080\000\000\000\
\\005\000\122\000\012\000\080\000\000\000\
\\005\000\123\000\012\000\080\000\000\000\
\\005\000\124\000\012\000\080\000\000\000\
\\005\000\125\000\012\000\080\000\000\000\
\\005\000\126\000\012\000\080\000\000\000\
\\005\000\127\000\012\000\080\000\000\000\
\\005\000\128\000\012\000\080\000\000\000\
\\000\000\
\\005\000\129\000\012\000\080\000\000\000\
\\005\000\130\000\012\000\080\000\000\000\
\\005\000\131\000\012\000\080\000\000\000\
\\000\000\
\\000\000\
\\000\000\
\\005\000\135\000\006\000\134\000\007\000\133\000\012\000\080\000\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\001\000\065\000\012\000\064\000\016\000\137\000\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\000\000\
\\001\000\065\000\012\000\064\000\016\000\140\000\000\000\
\\000\000\
\\005\000\141\000\012\000\080\000\000\000\
\\000\000\
\\000\000\
\\000\000\
\\001\000\065\000\012\000\064\000\016\000\143\000\000\000\
\\000\000\
\\000\000\
\"
val numstates = 145
val numrules = 70
val s = ref "" and index = ref 0
val string_to_int = fn () => 
let val i = !index
in index := i+2; Char.ord(String.sub(!s,i)) + Char.ord(String.sub(!s,i+1)) * 256
end
val string_to_list = fn s' =>
    let val len = String.size s'
        fun f () =
           if !index < len then string_to_int() :: f()
           else nil
   in index := 0; s := s'; f ()
   end
val string_to_pairlist = fn (conv_key,conv_entry) =>
     let fun f () =
         case string_to_int()
         of 0 => EMPTY
          | n => PAIR(conv_key (n-1),conv_entry (string_to_int()),f())
     in f
     end
val string_to_pairlist_default = fn (conv_key,conv_entry) =>
    let val conv_row = string_to_pairlist(conv_key,conv_entry)
    in fn () =>
       let val default = conv_entry(string_to_int())
           val row = conv_row()
       in (row,default)
       end
   end
val string_to_table = fn (convert_row,s') =>
    let val len = String.size s'
        fun f ()=
           if !index < len then convert_row() :: f()
           else nil
     in (s := s'; index := 0; f ())
     end
local
  val memo = Array.array(numstates+numrules,ERROR)
  val _ =let fun g i=(Array.update(memo,i,REDUCE(i-numstates)); g(i+1))
       fun f i =
            if i=numstates then g i
            else (Array.update(memo,i,SHIFT (STATE i)); f (i+1))
          in f 0 handle Subscript => ()
          end
in
val entry_to_action = fn 0 => ACCEPT | 1 => ERROR | j => Array.sub(memo,(j-2))
end
val gotoT=Array.fromList(string_to_table(string_to_pairlist(NT,STATE),gotoT))
val actionRows=string_to_table(string_to_pairlist_default(T,entry_to_action),actionRows)
val actionRowNumbers = string_to_list actionRowNumbers
val actionT = let val actionRowLookUp=
let val a=Array.fromList(actionRows) in fn i=>Array.sub(a,i) end
in Array.fromList(map actionRowLookUp actionRowNumbers)
end
in LrTable.mkLrTable {actions=actionT,gotos=gotoT,numRules=numrules,
numStates=numstates,initialState=STATE 0}
end
end
local open Header in
type pos = int
type arg = unit
structure MlyValue = 
struct
datatype svalue = VOID' | ntVOID of unit ->  unit
 | INTCONST of unit ->  (string) | ID of unit ->  (string)
 | varDecs of unit ->  ({ name:Id.t,ty:T.t }  list)
 | varDec of unit ->  ({ name:Id.t,ty:T.t } ) | ty of unit ->  (T.t)
 | topDecs of unit ->  (Top.t list) | structDec of unit ->  (D.t)
 | stms of unit ->  (S.t list) | stm of unit ->  (S.t)
 | prog of unit ->  (P.t)
 | params2 of unit ->  ({ name:Id.t,ty:T.t }  list)
 | params of unit ->  ({ name:Id.t,ty:T.t }  list)
 | lval of unit ->  (L.t) | ids2 of unit ->  (Id.t list)
 | ids of unit ->  (Id.t list) | funDef of unit ->  (F.t)
 | funDec of unit ->  (D.t) | exps2 of unit ->  (E.t list)
 | exps of unit ->  (E.t list) | exp of unit ->  (E.t)
 | enumDec of unit ->  (D.t) | decs of unit ->  (D.t list)
 | dec of unit ->  (D.t) | compStm of unit ->  (S.t)
end
type svalue = MlyValue.svalue
type result = P.t
end
structure EC=
struct
open LrTable
infix 5 $$
fun x $$ y = y::x
val is_keyword =
fn (T 12) => true | _ => false
val preferred_change : (term list * term list) list = 
(nil
,nil
 $$ (T 17))::
nil
val noShift = 
fn (T 10) => true | _ => false
val showTerminal =
fn (T 0) => "AND"
  | (T 1) => "ARROW"
  | (T 2) => "ASNOP"
  | (T 3) => "ASSIGN"
  | (T 4) => "CHAR"
  | (T 5) => "COLON"
  | (T 6) => "COMMA"
  | (T 7) => "DIVIDE"
  | (T 8) => "ELSE"
  | (T 9) => "ENUM"
  | (T 10) => "EOF"
  | (T 11) => "ID"
  | (T 12) => "IF"
  | (T 13) => "INT"
  | (T 14) => "INTCONST"
  | (T 15) => "LBRACE"
  | (T 16) => "LBRACK"
  | (T 17) => "LPAREN"
  | (T 18) => "PLUS"
  | (T 19) => "RBRACE"
  | (T 20) => "RBRACK"
  | (T 21) => "RETURN"
  | (T 22) => "RPAREN"
  | (T 23) => "SEMICOLON"
  | (T 24) => "STRUCT"
  | (T 25) => "VOID"
  | (T 26) => "WHILE"
  | (T 27) => "MINUS"
  | (T 28) => "TIMES"
  | (T 29) => "MODUS"
  | (T 30) => "GT"
  | (T 31) => "GE"
  | (T 32) => "LT"
  | (T 33) => "LE"
  | (T 34) => "EQ"
  | (T 35) => "NEQ"
  | (T 36) => "OR"
  | (T 37) => "NOT"
  | (T 38) => "DOT"
  | (T 39) => "UNARY"
  | _ => "bogus-term"
local open Header in
val errtermvalue=
fn (T 11) => MlyValue.ID(fn () => ("<bogus>")) | 
(T 14) => MlyValue.INTCONST(fn () => ("0")) | 
_ => MlyValue.VOID'
end
val terms : term list = nil
 $$ (T 39) $$ (T 38) $$ (T 37) $$ (T 36) $$ (T 35) $$ (T 34) $$ (T 33)
 $$ (T 32) $$ (T 31) $$ (T 30) $$ (T 29) $$ (T 28) $$ (T 27) $$ (T 26)
 $$ (T 25) $$ (T 24) $$ (T 23) $$ (T 22) $$ (T 21) $$ (T 20) $$ (T 19)
 $$ (T 18) $$ (T 17) $$ (T 16) $$ (T 15) $$ (T 13) $$ (T 12) $$ (T 10)
 $$ (T 9) $$ (T 8) $$ (T 7) $$ (T 6) $$ (T 5) $$ (T 4) $$ (T 3) $$ (T 
2) $$ (T 1) $$ (T 0)end
structure Actions =
struct 
exception mlyAction of int
local open Header in
val actions = 
fn (i392,defaultPos,stack,
    (()):arg) =>
case (i392,stack)
of  ( 0, ( ( _, ( MlyValue.topDecs topDecs1, topDecs1left, 
topDecs1right)) :: rest671)) => let val  result = MlyValue.prog (fn _
 => let val  (topDecs as topDecs1) = topDecs1 ()
 in (P.T topDecs)
end)
 in ( LrTable.NT 14, ( result, topDecs1left, topDecs1right), rest671)

end
|  ( 1, ( ( _, ( MlyValue.funDef funDef1, _, funDef1right)) :: ( _, ( 
MlyValue.topDecs topDecs1, topDecs1left, _)) :: rest671)) => let val  
result = MlyValue.topDecs (fn _ => let val  (topDecs as topDecs1) = 
topDecs1 ()
 val  (funDef as funDef1) = funDef1 ()
 in (topDecs@[Top.Fun funDef])
end)
 in ( LrTable.NT 18, ( result, topDecs1left, funDef1right), rest671)

end
|  ( 2, ( ( _, ( MlyValue.dec dec1, _, dec1right)) :: ( _, ( 
MlyValue.topDecs topDecs1, topDecs1left, _)) :: rest671)) => let val  
result = MlyValue.topDecs (fn _ => let val  (topDecs as topDecs1) = 
topDecs1 ()
 val  (dec as dec1) = dec1 ()
 in (topDecs@[Top.Dec dec])
end)
 in ( LrTable.NT 18, ( result, topDecs1left, dec1right), rest671)
end
|  ( 3, ( rest671)) => let val  result = MlyValue.topDecs (fn _ => ([]
))
 in ( LrTable.NT 18, ( result, defaultPos, defaultPos), rest671)
end
|  ( 4, ( ( _, ( MlyValue.compStm compStm1, _, compStm1right)) :: _ ::
 ( _, ( MlyValue.params params1, _, _)) :: _ :: ( _, ( MlyValue.ID ID1
, _, _)) :: ( _, ( MlyValue.ty ty1, ty1left, _)) :: rest671)) => let
 val  result = MlyValue.funDef (fn _ => let val  (ty as ty1) = ty1 ()
 val  (ID as ID1) = ID1 ()
 val  (params as params1) = params1 ()
 val  (compStm as compStm1) = compStm1 ()
 in (
F.T {name = Id.fromString ID,
                      rettype = ty,
                      args = params,
                      stm = compStm}
)
end)
 in ( LrTable.NT 8, ( result, ty1left, compStm1right), rest671)
end
|  ( 5, ( ( _, ( MlyValue.params2 params21, params21left, 
params21right)) :: rest671)) => let val  result = MlyValue.params (fn
 _ => let val  (params2 as params21) = params21 ()
 in (params2)
end)
 in ( LrTable.NT 12, ( result, params21left, params21right), rest671)

end
|  ( 6, ( rest671)) => let val  result = MlyValue.params (fn _ => ([])
)
 in ( LrTable.NT 12, ( result, defaultPos, defaultPos), rest671)
end
|  ( 7, ( ( _, ( MlyValue.ID ID1, _, ID1right)) :: ( _, ( MlyValue.ty 
ty1, _, _)) :: _ :: ( _, ( MlyValue.params2 params21, params21left, _)
) :: rest671)) => let val  result = MlyValue.params2 (fn _ => let val 
 (params2 as params21) = params21 ()
 val  (ty as ty1) = ty1 ()
 val  (ID as ID1) = ID1 ()
 in (params2 @ [{name = Id.fromString ID, ty = ty}])
end)
 in ( LrTable.NT 13, ( result, params21left, ID1right), rest671)
end
|  ( 8, ( ( _, ( MlyValue.ID ID1, _, ID1right)) :: ( _, ( MlyValue.ty 
ty1, ty1left, _)) :: rest671)) => let val  result = MlyValue.params2
 (fn _ => let val  (ty as ty1) = ty1 ()
 val  (ID as ID1) = ID1 ()
 in ([{name = Id.fromString ID, ty = ty}])
end)
 in ( LrTable.NT 13, ( result, ty1left, ID1right), rest671)
end
|  ( 9, ( ( _, ( MlyValue.dec dec1, _, dec1right)) :: ( _, ( 
MlyValue.decs decs1, decs1left, _)) :: rest671)) => let val  result = 
MlyValue.decs (fn _ => let val  (decs as decs1) = decs1 ()
 val  (dec as dec1) = dec1 ()
 in (decs@[dec])
end)
 in ( LrTable.NT 2, ( result, decs1left, dec1right), rest671)
end
|  ( 10, ( rest671)) => let val  result = MlyValue.decs (fn _ => ([]))
 in ( LrTable.NT 2, ( result, defaultPos, defaultPos), rest671)
end
|  ( 11, ( ( _, ( MlyValue.structDec structDec1, structDec1left, 
structDec1right)) :: rest671)) => let val  result = MlyValue.dec (fn _
 => let val  (structDec as structDec1) = structDec1 ()
 in (structDec)
end)
 in ( LrTable.NT 1, ( result, structDec1left, structDec1right), 
rest671)
end
|  ( 12, ( ( _, ( MlyValue.enumDec enumDec1, enumDec1left, 
enumDec1right)) :: rest671)) => let val  result = MlyValue.dec (fn _
 => let val  (enumDec as enumDec1) = enumDec1 ()
 in (enumDec)
end)
 in ( LrTable.NT 1, ( result, enumDec1left, enumDec1right), rest671)

end
|  ( 13, ( ( _, ( MlyValue.varDec varDec1, varDec1left, varDec1right))
 :: rest671)) => let val  result = MlyValue.dec (fn _ => let val  (
varDec as varDec1) = varDec1 ()
 in (D.VarDec varDec)
end)
 in ( LrTable.NT 1, ( result, varDec1left, varDec1right), rest671)
end
|  ( 14, ( ( _, ( MlyValue.funDec funDec1, funDec1left, funDec1right))
 :: rest671)) => let val  result = MlyValue.dec (fn _ => let val  (
funDec as funDec1) = funDec1 ()
 in (funDec)
end)
 in ( LrTable.NT 1, ( result, funDec1left, funDec1right), rest671)
end
|  ( 15, ( ( _, ( _, _, SEMICOLON1right)) :: _ :: ( _, ( 
MlyValue.varDecs varDecs1, _, _)) :: _ :: ( _, ( MlyValue.ID ID1, _, _
)) :: ( _, ( _, STRUCT1left, _)) :: rest671)) => let val  result = 
MlyValue.structDec (fn _ => let val  (ID as ID1) = ID1 ()
 val  (varDecs as varDecs1) = varDecs1 ()
 in (
D.StructDec {name = Id.fromString ID,
                                                                   fields = varDecs}
)
end)
 in ( LrTable.NT 17, ( result, STRUCT1left, SEMICOLON1right), rest671)

end
|  ( 16, ( ( _, ( _, _, SEMICOLON1right)) :: _ :: ( _, ( MlyValue.ids 
ids1, _, _)) :: _ :: ( _, ( MlyValue.ID ID1, _, _)) :: ( _, ( _, 
ENUM1left, _)) :: rest671)) => let val  result = MlyValue.enumDec (fn
 _ => let val  (ID as ID1) = ID1 ()
 val  (ids as ids1) = ids1 ()
 in (
D.EnumDec {name = Id.fromString ID,
                                                         fields = ids}
)
end)
 in ( LrTable.NT 3, ( result, ENUM1left, SEMICOLON1right), rest671)

end
|  ( 17, ( ( _, ( MlyValue.varDec varDec1, _, varDec1right)) :: ( _, (
 MlyValue.varDecs varDecs1, varDecs1left, _)) :: rest671)) => let val 
 result = MlyValue.varDecs (fn _ => let val  (varDecs as varDecs1) = 
varDecs1 ()
 val  (varDec as varDec1) = varDec1 ()
 in (varDecs @ [varDec])
end)
 in ( LrTable.NT 21, ( result, varDecs1left, varDec1right), rest671)

end
|  ( 18, ( rest671)) => let val  result = MlyValue.varDecs (fn _ => (
[]))
 in ( LrTable.NT 21, ( result, defaultPos, defaultPos), rest671)
end
|  ( 19, ( ( _, ( _, _, SEMICOLON1right)) :: ( _, ( MlyValue.ID ID1, _
, _)) :: ( _, ( MlyValue.ty ty1, ty1left, _)) :: rest671)) => let val 
 result = MlyValue.varDec (fn _ => let val  (ty as ty1) = ty1 ()
 val  (ID as ID1) = ID1 ()
 in ({name = Id.fromString ID,
                          ty = ty})
end
)
 in ( LrTable.NT 20, ( result, ty1left, SEMICOLON1right), rest671)
end
|  ( 20, ( ( _, ( _, _, SEMICOLON1right)) :: _ :: _ :: _ :: ( _, ( 
MlyValue.ID ID1, _, _)) :: _ :: _ :: ( _, ( MlyValue.ty ty1, ty1left,
 _)) :: rest671)) => let val  result = MlyValue.varDec (fn _ => let
 val  (ty as ty1) = ty1 ()
 val  (ID as ID1) = ID1 ()
 in ({name = Id.fromString ID,
                  ty = T.Array ty})
end
)
 in ( LrTable.NT 20, ( result, ty1left, SEMICOLON1right), rest671)
end
|  ( 21, ( ( _, ( _, _, SEMICOLON1right)) :: _ :: ( _, ( 
MlyValue.params params1, _, _)) :: _ :: ( _, ( MlyValue.ID ID1, _, _))
 :: ( _, ( MlyValue.ty ty1, ty1left, _)) :: rest671)) => let val  
result = MlyValue.funDec (fn _ => let val  (ty as ty1) = ty1 ()
 val  (ID as ID1) = ID1 ()
 val  (params as params1) = params1 ()
 in (
D.FunDec {name = Id.fromString ID,
                                                        rettype = ty,
                                                        args = params}
)
end)
 in ( LrTable.NT 7, ( result, ty1left, SEMICOLON1right), rest671)
end
|  ( 22, ( ( _, ( MlyValue.ids2 ids21, ids21left, ids21right)) :: 
rest671)) => let val  result = MlyValue.ids (fn _ => let val  (ids2
 as ids21) = ids21 ()
 in (ids2)
end)
 in ( LrTable.NT 9, ( result, ids21left, ids21right), rest671)
end
|  ( 23, ( rest671)) => let val  result = MlyValue.ids (fn _ => ([]))
 in ( LrTable.NT 9, ( result, defaultPos, defaultPos), rest671)
end
|  ( 24, ( ( _, ( MlyValue.ID ID1, _, ID1right)) :: _ :: ( _, ( 
MlyValue.ids2 ids21, ids21left, _)) :: rest671)) => let val  result = 
MlyValue.ids2 (fn _ => let val  (ids2 as ids21) = ids21 ()
 val  (ID as ID1) = ID1 ()
 in (ids2@[Id.fromString ID])
end)
 in ( LrTable.NT 10, ( result, ids21left, ID1right), rest671)
end
|  ( 25, ( ( _, ( MlyValue.ID ID1, ID1left, ID1right)) :: rest671)) =>
 let val  result = MlyValue.ids2 (fn _ => let val  (ID as ID1) = ID1
 ()
 in ([Id.fromString ID])
end)
 in ( LrTable.NT 10, ( result, ID1left, ID1right), rest671)
end
|  ( 26, ( ( _, ( _, CHAR1left, CHAR1right)) :: rest671)) => let val  
result = MlyValue.ty (fn _ => (T.Char))
 in ( LrTable.NT 19, ( result, CHAR1left, CHAR1right), rest671)
end
|  ( 27, ( ( _, ( _, INT1left, INT1right)) :: rest671)) => let val  
result = MlyValue.ty (fn _ => (T.Int))
 in ( LrTable.NT 19, ( result, INT1left, INT1right), rest671)
end
|  ( 28, ( ( _, ( _, VOID1left, VOID1right)) :: rest671)) => let val  
result = MlyValue.ty (fn _ => (T.Void))
 in ( LrTable.NT 19, ( result, VOID1left, VOID1right), rest671)
end
|  ( 29, ( ( _, ( _, _, TIMES1right)) :: ( _, ( MlyValue.ID ID1, _, _)
) :: ( _, ( _, STRUCT1left, _)) :: rest671)) => let val  result = 
MlyValue.ty (fn _ => let val  (ID as ID1) = ID1 ()
 in (T.Pointer (T.Struct (Id.fromString ID)))
end)
 in ( LrTable.NT 19, ( result, STRUCT1left, TIMES1right), rest671)
end
|  ( 30, ( ( _, ( MlyValue.ID ID1, _, ID1right)) :: ( _, ( _, 
ENUM1left, _)) :: rest671)) => let val  result = MlyValue.ty (fn _ =>
 let val  (ID as ID1) = ID1 ()
 in (T.Enum (Id.fromString ID))
end)
 in ( LrTable.NT 19, ( result, ENUM1left, ID1right), rest671)
end
|  ( 31, ( ( _, ( _, _, TIMES1right)) :: ( _, ( MlyValue.ty ty1, 
ty1left, _)) :: rest671)) => let val  result = MlyValue.ty (fn _ =>
 let val  (ty as ty1) = ty1 ()
 in (T.Pointer ty)
end)
 in ( LrTable.NT 19, ( result, ty1left, TIMES1right), rest671)
end
|  ( 32, ( ( _, ( MlyValue.stm stm1, _, stm1right)) :: ( _, ( 
MlyValue.stms stms1, stms1left, _)) :: rest671)) => let val  result = 
MlyValue.stms (fn _ => let val  (stms as stms1) = stms1 ()
 val  (stm as stm1) = stm1 ()
 in (stms @ [stm])
end)
 in ( LrTable.NT 16, ( result, stms1left, stm1right), rest671)
end
|  ( 33, ( rest671)) => let val  result = MlyValue.stms (fn _ => ([]))
 in ( LrTable.NT 16, ( result, defaultPos, defaultPos), rest671)
end
|  ( 34, ( ( _, ( _, _, SEMICOLON1right)) :: ( _, ( MlyValue.exp exp1,
 _, _)) :: _ :: ( _, ( MlyValue.lval lval1, (lvalleft as lval1left), _
)) :: rest671)) => let val  result = MlyValue.stm (fn _ => let val  (
lval as lval1) = lval1 ()
 val  (exp as exp1) = exp1 ()
 in (S.Assign (lval, exp,lvalleft))
end)
 in ( LrTable.NT 15, ( result, lval1left, SEMICOLON1right), rest671)

end
|  ( 35, ( ( _, ( MlyValue.compStm compStm1, compStm1left, 
compStm1right)) :: rest671)) => let val  result = MlyValue.stm (fn _
 => let val  (compStm as compStm1) = compStm1 ()
 in (compStm)
end)
 in ( LrTable.NT 15, ( result, compStm1left, compStm1right), rest671)

end
|  ( 36, ( ( _, ( _, _, SEMICOLON1right)) :: ( _, ( MlyValue.exp exp1,
 _, _)) :: ( _, ( _, (RETURNleft as RETURN1left), _)) :: rest671)) =>
 let val  result = MlyValue.stm (fn _ => let val  (exp as exp1) = exp1
 ()
 in (S.Return (SOME exp, RETURNleft))
end)
 in ( LrTable.NT 15, ( result, RETURN1left, SEMICOLON1right), rest671)

end
|  ( 37, ( ( _, ( _, _, SEMICOLON1right)) :: ( _, ( _, (RETURNleft as 
RETURN1left), _)) :: rest671)) => let val  result = MlyValue.stm (fn _
 => (S.Return (NONE, RETURNleft)))
 in ( LrTable.NT 15, ( result, RETURN1left, SEMICOLON1right), rest671)

end
|  ( 38, ( ( _, ( MlyValue.stm stm2, _, stm2right)) :: _ :: ( _, ( 
MlyValue.stm stm1, _, _)) :: _ :: ( _, ( MlyValue.exp exp1, _, _)) ::
 _ :: ( _, ( _, (IFleft as IF1left), _)) :: rest671)) => let val  
result = MlyValue.stm (fn _ => let val  (exp as exp1) = exp1 ()
 val  stm1 = stm1 ()
 val  stm2 = stm2 ()
 in (
S.If {condition = exp, 
                       thenn = stm1, 
                       elsee = SOME stm2, 
                       pos = IFleft}
)
end)
 in ( LrTable.NT 15, ( result, IF1left, stm2right), rest671)
end
|  ( 39, ( ( _, ( MlyValue.stm stm1, _, stm1right)) :: _ :: ( _, ( 
MlyValue.exp exp1, _, _)) :: _ :: ( _, ( _, (IFleft as IF1left), _))
 :: rest671)) => let val  result = MlyValue.stm (fn _ => let val  (exp
 as exp1) = exp1 ()
 val  (stm as stm1) = stm1 ()
 in (
S.If {condition = exp, 
                       thenn = stm, 
                       elsee = NONE, 
                       pos = IFleft}
)
end)
 in ( LrTable.NT 15, ( result, IF1left, stm1right), rest671)
end
|  ( 40, ( ( _, ( MlyValue.stm stm1, _, stm1right)) :: _ :: ( _, ( 
MlyValue.exp exp1, _, _)) :: _ :: ( _, ( _, (WHILEleft as WHILE1left),
 _)) :: rest671)) => let val  result = MlyValue.stm (fn _ => let val 
 (exp as exp1) = exp1 ()
 val  (stm as stm1) = stm1 ()
 in (
S.While {condition = exp,
                            body = stm,
                            pos = WHILEleft}
)
end)
 in ( LrTable.NT 15, ( result, WHILE1left, stm1right), rest671)
end
|  ( 41, ( ( _, ( _, _, RBRACE1right)) :: ( _, ( MlyValue.stms stms1,
 _, _)) :: ( _, ( MlyValue.decs decs1, _, _)) :: ( _, ( _, (LBRACEleft
 as LBRACE1left), _)) :: rest671)) => let val  result = 
MlyValue.compStm (fn _ => let val  (decs as decs1) = decs1 ()
 val  (stms as stms1) = stms1 ()
 in (S.Comp {decs = decs, stms = stms, pos = LBRACEleft})
end)
 in ( LrTable.NT 0, ( result, LBRACE1left, RBRACE1right), rest671)
end
|  ( 42, ( ( _, ( _, _, RPAREN1right)) :: ( _, ( MlyValue.lval lval1,
 _, _)) :: ( _, ( _, LPAREN1left, _)) :: rest671)) => let val  result
 = MlyValue.lval (fn _ => let val  (lval as lval1) = lval1 ()
 in (lval)
end)
 in ( LrTable.NT 11, ( result, LPAREN1left, RPAREN1right), rest671)

end
|  ( 43, ( ( _, ( MlyValue.ID ID1, (IDleft as ID1left), ID1right)) :: 
rest671)) => let val  result = MlyValue.lval (fn _ => let val  (ID as 
ID1) = ID1 ()
 in (L.Var (Id.fromString ID, IDleft))
end)
 in ( LrTable.NT 11, ( result, ID1left, ID1right), rest671)
end
|  ( 44, ( ( _, ( MlyValue.lval lval1, _, lval1right)) :: ( _, ( _, (
TIMESleft as TIMES1left), _)) :: rest671)) => let val  result = 
MlyValue.lval (fn _ => let val  (lval as lval1) = lval1 ()
 in (L.Ptr (lval, TIMESleft))
end)
 in ( LrTable.NT 11, ( result, TIMES1left, lval1right), rest671)
end
|  ( 45, ( ( _, ( _, _, RBRACK1right)) :: ( _, ( MlyValue.exp exp1, _,
 _)) :: _ :: ( _, ( MlyValue.lval lval1, (lvalleft as lval1left), _))
 :: rest671)) => let val  result = MlyValue.lval (fn _ => let val  (
lval as lval1) = lval1 ()
 val  (exp as exp1) = exp1 ()
 in (L.Array (lval, exp, lvalleft))
end)
 in ( LrTable.NT 11, ( result, lval1left, RBRACK1right), rest671)
end
|  ( 46, ( ( _, ( MlyValue.ID ID1, _, ID1right)) :: _ :: ( _, ( 
MlyValue.lval lval1, (lvalleft as lval1left), _)) :: rest671)) => let
 val  result = MlyValue.lval (fn _ => let val  (lval as lval1) = lval1
 ()
 val  (ID as ID1) = ID1 ()
 in (L.Struct (lval, Id.fromString ID, lvalleft))
end)
 in ( LrTable.NT 11, ( result, lval1left, ID1right), rest671)
end
|  ( 47, ( ( _, ( MlyValue.ID ID1, _, ID1right)) :: _ :: ( _, ( 
MlyValue.lval lval1, (lvalleft as lval1left), _)) :: rest671)) => let
 val  result = MlyValue.lval (fn _ => let val  (lval as lval1) = lval1
 ()
 val  (ID as ID1) = ID1 ()
 in (L.Pstruct (lval, Id.fromString ID, lvalleft))
end)
 in ( LrTable.NT 11, ( result, lval1left, ID1right), rest671)
end
|  ( 48, ( ( _, ( MlyValue.INTCONST INTCONST1, INTCONST1left, 
INTCONST1right)) :: rest671)) => let val  result = MlyValue.exp (fn _
 => let val  (INTCONST as INTCONST1) = INTCONST1 ()
 in (E.IntNum (Intl.fromString INTCONST))
end)
 in ( LrTable.NT 4, ( result, INTCONST1left, INTCONST1right), rest671)

end
|  ( 49, ( ( _, ( _, _, RPAREN1right)) :: ( _, ( MlyValue.exp exp1, _,
 _)) :: ( _, ( _, LPAREN1left, _)) :: rest671)) => let val  result = 
MlyValue.exp (fn _ => let val  (exp as exp1) = exp1 ()
 in (exp)
end)
 in ( LrTable.NT 4, ( result, LPAREN1left, RPAREN1right), rest671)
end
|  ( 50, ( ( _, ( MlyValue.lval lval1, lval1left, lval1right)) :: 
rest671)) => let val  result = MlyValue.exp (fn _ => let val  (lval
 as lval1) = lval1 ()
 in (E.Lval (lval))
end)
 in ( LrTable.NT 4, ( result, lval1left, lval1right), rest671)
end
|  ( 51, ( ( _, ( MlyValue.exp exp2, _, exp2right)) :: _ :: ( _, ( 
MlyValue.exp exp1, exp1left, _)) :: rest671)) => let val  result = 
MlyValue.exp (fn _ => let val  exp1 = exp1 ()
 val  exp2 = exp2 ()
 in (binop (exp1, B.Plus, exp2, exp1left))
end)
 in ( LrTable.NT 4, ( result, exp1left, exp2right), rest671)
end
|  ( 52, ( ( _, ( MlyValue.exp exp2, _, exp2right)) :: _ :: ( _, ( 
MlyValue.exp exp1, exp1left, _)) :: rest671)) => let val  result = 
MlyValue.exp (fn _ => let val  exp1 = exp1 ()
 val  exp2 = exp2 ()
 in (binop (exp1, B.Minus, exp2, exp1left))
end)
 in ( LrTable.NT 4, ( result, exp1left, exp2right), rest671)
end
|  ( 53, ( ( _, ( MlyValue.exp exp2, _, exp2right)) :: _ :: ( _, ( 
MlyValue.exp exp1, exp1left, _)) :: rest671)) => let val  result = 
MlyValue.exp (fn _ => let val  exp1 = exp1 ()
 val  exp2 = exp2 ()
 in (binop (exp1, B.Times, exp2, exp1left))
end)
 in ( LrTable.NT 4, ( result, exp1left, exp2right), rest671)
end
|  ( 54, ( ( _, ( MlyValue.exp exp2, _, exp2right)) :: _ :: ( _, ( 
MlyValue.exp exp1, exp1left, _)) :: rest671)) => let val  result = 
MlyValue.exp (fn _ => let val  exp1 = exp1 ()
 val  exp2 = exp2 ()
 in (binop (exp1, B.Divide, exp2, exp1left))
end)
 in ( LrTable.NT 4, ( result, exp1left, exp2right), rest671)
end
|  ( 55, ( ( _, ( MlyValue.exp exp2, _, exp2right)) :: _ :: ( _, ( 
MlyValue.exp exp1, exp1left, _)) :: rest671)) => let val  result = 
MlyValue.exp (fn _ => let val  exp1 = exp1 ()
 val  exp2 = exp2 ()
 in (binop (exp1, B.Modus, exp2, exp1left))
end)
 in ( LrTable.NT 4, ( result, exp1left, exp2right), rest671)
end
|  ( 56, ( ( _, ( MlyValue.exp exp2, _, exp2right)) :: _ :: ( _, ( 
MlyValue.exp exp1, exp1left, _)) :: rest671)) => let val  result = 
MlyValue.exp (fn _ => let val  exp1 = exp1 ()
 val  exp2 = exp2 ()
 in (binop (exp1, B.Gt, exp2, exp1left))
end)
 in ( LrTable.NT 4, ( result, exp1left, exp2right), rest671)
end
|  ( 57, ( ( _, ( MlyValue.exp exp2, _, exp2right)) :: _ :: ( _, ( 
MlyValue.exp exp1, exp1left, _)) :: rest671)) => let val  result = 
MlyValue.exp (fn _ => let val  exp1 = exp1 ()
 val  exp2 = exp2 ()
 in (binop (exp1, B.Ge, exp2, exp1left))
end)
 in ( LrTable.NT 4, ( result, exp1left, exp2right), rest671)
end
|  ( 58, ( ( _, ( MlyValue.exp exp2, _, exp2right)) :: _ :: ( _, ( 
MlyValue.exp exp1, exp1left, _)) :: rest671)) => let val  result = 
MlyValue.exp (fn _ => let val  exp1 = exp1 ()
 val  exp2 = exp2 ()
 in (binop (exp1, B.Lt, exp2, exp1left))
end)
 in ( LrTable.NT 4, ( result, exp1left, exp2right), rest671)
end
|  ( 59, ( ( _, ( MlyValue.exp exp2, _, exp2right)) :: _ :: ( _, ( 
MlyValue.exp exp1, exp1left, _)) :: rest671)) => let val  result = 
MlyValue.exp (fn _ => let val  exp1 = exp1 ()
 val  exp2 = exp2 ()
 in (binop (exp1, B.Le, exp2, exp1left))
end)
 in ( LrTable.NT 4, ( result, exp1left, exp2right), rest671)
end
|  ( 60, ( ( _, ( MlyValue.exp exp2, _, exp2right)) :: _ :: ( _, ( 
MlyValue.exp exp1, exp1left, _)) :: rest671)) => let val  result = 
MlyValue.exp (fn _ => let val  exp1 = exp1 ()
 val  exp2 = exp2 ()
 in (binop (exp1, B.Eq, exp2, exp1left))
end)
 in ( LrTable.NT 4, ( result, exp1left, exp2right), rest671)
end
|  ( 61, ( ( _, ( MlyValue.exp exp2, _, exp2right)) :: _ :: ( _, ( 
MlyValue.exp exp1, exp1left, _)) :: rest671)) => let val  result = 
MlyValue.exp (fn _ => let val  exp1 = exp1 ()
 val  exp2 = exp2 ()
 in (binop (exp1, B.Ne, exp2, exp1left))
end)
 in ( LrTable.NT 4, ( result, exp1left, exp2right), rest671)
end
|  ( 62, ( ( _, ( MlyValue.exp exp1, _, exp1right)) :: ( _, ( _, (
NOTleft as NOT1left), _)) :: rest671)) => let val  result = 
MlyValue.exp (fn _ => let val  (exp as exp1) = exp1 ()
 in (E.Not (exp, NOTleft))
end)
 in ( LrTable.NT 4, ( result, NOT1left, exp1right), rest671)
end
|  ( 63, ( ( _, ( MlyValue.exp exp2, _, exp2right)) :: _ :: ( _, ( 
MlyValue.exp exp1, exp1left, _)) :: rest671)) => let val  result = 
MlyValue.exp (fn _ => let val  exp1 = exp1 ()
 val  exp2 = exp2 ()
 in (binop (exp1, B.And, exp2, exp1left))
end)
 in ( LrTable.NT 4, ( result, exp1left, exp2right), rest671)
end
|  ( 64, ( ( _, ( MlyValue.exp exp2, _, exp2right)) :: _ :: ( _, ( 
MlyValue.exp exp1, exp1left, _)) :: rest671)) => let val  result = 
MlyValue.exp (fn _ => let val  exp1 = exp1 ()
 val  exp2 = exp2 ()
 in (binop (exp1, B.Or, exp2, exp1left))
end)
 in ( LrTable.NT 4, ( result, exp1left, exp2right), rest671)
end
|  ( 65, ( ( _, ( _, _, RPAREN1right)) :: ( _, ( MlyValue.exps exps1,
 _, _)) :: _ :: ( _, ( MlyValue.ID ID1, (IDleft as ID1left), _)) :: 
rest671)) => let val  result = MlyValue.exp (fn _ => let val  (ID as 
ID1) = ID1 ()
 val  (exps as exps1) = exps1 ()
 in (E.Call (Id.fromString ID, exps, IDleft))
end)
 in ( LrTable.NT 4, ( result, ID1left, RPAREN1right), rest671)
end
|  ( 66, ( ( _, ( MlyValue.exps2 exps21, exps21left, exps21right)) :: 
rest671)) => let val  result = MlyValue.exps (fn _ => let val  (exps2
 as exps21) = exps21 ()
 in (exps2)
end)
 in ( LrTable.NT 5, ( result, exps21left, exps21right), rest671)
end
|  ( 67, ( rest671)) => let val  result = MlyValue.exps (fn _ => ([]))
 in ( LrTable.NT 5, ( result, defaultPos, defaultPos), rest671)
end
|  ( 68, ( ( _, ( MlyValue.exp exp1, _, exp1right)) :: _ :: ( _, ( 
MlyValue.exps2 exps21, exps21left, _)) :: rest671)) => let val  result
 = MlyValue.exps2 (fn _ => let val  (exps2 as exps21) = exps21 ()
 val  (exp as exp1) = exp1 ()
 in (exps2 @ [exp])
end)
 in ( LrTable.NT 6, ( result, exps21left, exp1right), rest671)
end
|  ( 69, ( ( _, ( MlyValue.exp exp1, exp1left, exp1right)) :: rest671)
) => let val  result = MlyValue.exps2 (fn _ => let val  (exp as exp1)
 = exp1 ()
 in ([exp])
end)
 in ( LrTable.NT 6, ( result, exp1left, exp1right), rest671)
end
| _ => raise (mlyAction i392)
end
val void = MlyValue.VOID'
val extract = fn a => (fn MlyValue.prog x => x
| _ => let exception ParseInternal
	in raise ParseInternal end) a ()
end
end
structure Tokens : C_TOKENS =
struct
type svalue = ParserData.svalue
type ('a,'b) token = ('a,'b) Token.token
fun AND (p1,p2) = Token.TOKEN (ParserData.LrTable.T 0,(
ParserData.MlyValue.VOID',p1,p2))
fun ARROW (p1,p2) = Token.TOKEN (ParserData.LrTable.T 1,(
ParserData.MlyValue.VOID',p1,p2))
fun ASNOP (p1,p2) = Token.TOKEN (ParserData.LrTable.T 2,(
ParserData.MlyValue.VOID',p1,p2))
fun ASSIGN (p1,p2) = Token.TOKEN (ParserData.LrTable.T 3,(
ParserData.MlyValue.VOID',p1,p2))
fun CHAR (p1,p2) = Token.TOKEN (ParserData.LrTable.T 4,(
ParserData.MlyValue.VOID',p1,p2))
fun COLON (p1,p2) = Token.TOKEN (ParserData.LrTable.T 5,(
ParserData.MlyValue.VOID',p1,p2))
fun COMMA (p1,p2) = Token.TOKEN (ParserData.LrTable.T 6,(
ParserData.MlyValue.VOID',p1,p2))
fun DIVIDE (p1,p2) = Token.TOKEN (ParserData.LrTable.T 7,(
ParserData.MlyValue.VOID',p1,p2))
fun ELSE (p1,p2) = Token.TOKEN (ParserData.LrTable.T 8,(
ParserData.MlyValue.VOID',p1,p2))
fun ENUM (p1,p2) = Token.TOKEN (ParserData.LrTable.T 9,(
ParserData.MlyValue.VOID',p1,p2))
fun EOF (p1,p2) = Token.TOKEN (ParserData.LrTable.T 10,(
ParserData.MlyValue.VOID',p1,p2))
fun ID (i,p1,p2) = Token.TOKEN (ParserData.LrTable.T 11,(
ParserData.MlyValue.ID (fn () => i),p1,p2))
fun IF (p1,p2) = Token.TOKEN (ParserData.LrTable.T 12,(
ParserData.MlyValue.VOID',p1,p2))
fun INT (p1,p2) = Token.TOKEN (ParserData.LrTable.T 13,(
ParserData.MlyValue.VOID',p1,p2))
fun INTCONST (i,p1,p2) = Token.TOKEN (ParserData.LrTable.T 14,(
ParserData.MlyValue.INTCONST (fn () => i),p1,p2))
fun LBRACE (p1,p2) = Token.TOKEN (ParserData.LrTable.T 15,(
ParserData.MlyValue.VOID',p1,p2))
fun LBRACK (p1,p2) = Token.TOKEN (ParserData.LrTable.T 16,(
ParserData.MlyValue.VOID',p1,p2))
fun LPAREN (p1,p2) = Token.TOKEN (ParserData.LrTable.T 17,(
ParserData.MlyValue.VOID',p1,p2))
fun PLUS (p1,p2) = Token.TOKEN (ParserData.LrTable.T 18,(
ParserData.MlyValue.VOID',p1,p2))
fun RBRACE (p1,p2) = Token.TOKEN (ParserData.LrTable.T 19,(
ParserData.MlyValue.VOID',p1,p2))
fun RBRACK (p1,p2) = Token.TOKEN (ParserData.LrTable.T 20,(
ParserData.MlyValue.VOID',p1,p2))
fun RETURN (p1,p2) = Token.TOKEN (ParserData.LrTable.T 21,(
ParserData.MlyValue.VOID',p1,p2))
fun RPAREN (p1,p2) = Token.TOKEN (ParserData.LrTable.T 22,(
ParserData.MlyValue.VOID',p1,p2))
fun SEMICOLON (p1,p2) = Token.TOKEN (ParserData.LrTable.T 23,(
ParserData.MlyValue.VOID',p1,p2))
fun STRUCT (p1,p2) = Token.TOKEN (ParserData.LrTable.T 24,(
ParserData.MlyValue.VOID',p1,p2))
fun VOID (p1,p2) = Token.TOKEN (ParserData.LrTable.T 25,(
ParserData.MlyValue.VOID',p1,p2))
fun WHILE (p1,p2) = Token.TOKEN (ParserData.LrTable.T 26,(
ParserData.MlyValue.VOID',p1,p2))
fun MINUS (p1,p2) = Token.TOKEN (ParserData.LrTable.T 27,(
ParserData.MlyValue.VOID',p1,p2))
fun TIMES (p1,p2) = Token.TOKEN (ParserData.LrTable.T 28,(
ParserData.MlyValue.VOID',p1,p2))
fun MODUS (p1,p2) = Token.TOKEN (ParserData.LrTable.T 29,(
ParserData.MlyValue.VOID',p1,p2))
fun GT (p1,p2) = Token.TOKEN (ParserData.LrTable.T 30,(
ParserData.MlyValue.VOID',p1,p2))
fun GE (p1,p2) = Token.TOKEN (ParserData.LrTable.T 31,(
ParserData.MlyValue.VOID',p1,p2))
fun LT (p1,p2) = Token.TOKEN (ParserData.LrTable.T 32,(
ParserData.MlyValue.VOID',p1,p2))
fun LE (p1,p2) = Token.TOKEN (ParserData.LrTable.T 33,(
ParserData.MlyValue.VOID',p1,p2))
fun EQ (p1,p2) = Token.TOKEN (ParserData.LrTable.T 34,(
ParserData.MlyValue.VOID',p1,p2))
fun NEQ (p1,p2) = Token.TOKEN (ParserData.LrTable.T 35,(
ParserData.MlyValue.VOID',p1,p2))
fun OR (p1,p2) = Token.TOKEN (ParserData.LrTable.T 36,(
ParserData.MlyValue.VOID',p1,p2))
fun NOT (p1,p2) = Token.TOKEN (ParserData.LrTable.T 37,(
ParserData.MlyValue.VOID',p1,p2))
fun DOT (p1,p2) = Token.TOKEN (ParserData.LrTable.T 38,(
ParserData.MlyValue.VOID',p1,p2))
fun UNARY (p1,p2) = Token.TOKEN (ParserData.LrTable.T 39,(
ParserData.MlyValue.VOID',p1,p2))
end
end
